Repository navigation
Conversation
iacsha
requested review from
a team,
gibson9583,
jonbartels,
kayyagari,
kpalang,
mgaffigan,
pacmano1 and
ssrowe
November 4, 2026 21:35
NicoPiel
requested changes
Nov 4, 2026
NicoPiel
left a comment
Contributor
There was a problem hiding this comment.
License file header, otherwise LGTM.
tonygermano
force-pushed
the
fix/159-date-param-400
branch
from
November 4, 2026 22:20
f89224f to
1468ea2
Compare
iacsha
added a commit
to iacsha/engine
that referenced
this pull request
Nov 5, 2026
Per review feedback on OpenIntegrationEngine#562, replace the copied Mirth Corporation boilerplate header with the SPDX form used for new files.
Author
|
Thanks @NicoPiel and @tonygermano. Switched the new test file to the SPDX header, using the collective |
…penIntegrationEngine#159) CalendarParamConverterProvider threw ProcessingException on an unparseable startDate/endDate, which Jersey surfaced as 404. Throw BadRequestException (400) with the value and expected format so the caller learns why the request failed. Signed-off-by: iacsha <122627209+iacsha@users.noreply.github.com>
Per review feedback on OpenIntegrationEngine#562, replace the copied Mirth Corporation boilerplate header with the SPDX form used for new files. Signed-off-by: iacsha <122627209+iacsha@users.noreply.github.com>
iacsha
force-pushed
the
fix/159-date-param-400
branch
from
November 6, 2026 19:47
6abb13b to
4a48ac6
Compare
mgaffigan
approved these changes
Nov 7, 2026
mgaffigan
approved these changes
Nov 7, 2026
mgaffigan
left a comment
Contributor
There was a problem hiding this comment.
"Open Integration Engine Contributors" is not a legal entity. Until you sign an ECA, you individually retain copyright and are issuing an MPL-2 license. Approval since this has happened otherwise, and your git commit already signs your name and email.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Return 400 instead of 404 for a malformed date query parameter (fixes #159)
Problem
GET /api/channels/{channelId}/messages(and the other message endpoints) takestartDate/endDateas@QueryParam Calendar, converted byCalendarParamConverterProvider. On a malformed date,fromStringthrowsProcessingException, which Jersey surfaces as 404 Not Found:404 is misleading for a bad parameter value — the caller should get a 400 that says
what was wrong.
Fix
Throw
BadRequestException(400) from the converter, with a message naming the value andthe expected format:
JAX-RS honors a
WebApplicationExceptionthrown from aParamConverter(and noExceptionMappers are registered that would override it), so the response status is 400.Valid dates are unaffected.
Tests
CalendarParamConverterProviderTest:nullreturnsnullfromStringthentoString)BadRequestExceptionwith status 400./gradlew :server:test --tests "*CalendarParamConverterProviderTest*"→ 3 tests, 0 failures.Note on verification
The project has no Jersey HTTP test harness, so this is verified at the converter level —
the same approach as the existing
MetaDataSearchParamConverterProviderTest. TheHTTP-level 400 follows from JAX-RS
WebApplicationExceptionhandling as described above.